package com.ytclub.practice.api.common;

import lombok.Data;

/**
 * 分页请求实体
 *
 * @author: HuangQi
 * @date: Created in 20:43 2023/12/21
 * @description:
 */
@Data
public class PageInfo {

    private Integer pageNo = 1;

    private Integer pageSize = 20;

    public Integer getPageNo() {
        if (pageNo == null || pageNo < 1) {
            pageNo = 1;
        }
        return pageNo;
    }


    public Integer getPageSize(){
        if (pageSize == null || pageSize < 1 || pageSize > Integer.MAX_VALUE) {
            pageSize = 20;
        }
        return pageSize;
    }

}
